from pattern.circuit import Control


class entry(Control):

    def incoming(self, event):
        username = event.trail.username
        self.onQuit(event, username)
        event.trail.release()

    def onQuit(self, event, username):
        bridge = self.acquireInterface(event, "onQuit")
        if bridge is not None:
            bridge.push(username)
